package demo.log4j;


import org.apache.log4j.Logger;

public class Log4jDemo {

    private static final Logger logger = Logger.getLogger(Log4jDemo.class);


    public static void main(String[] args) throws InterruptedException {
        System.out.println("------------- start! -------------");
        for (int i = 0; i < 10; i++) {
            String msg = "Hello " + i;
            logger.warn(msg);
            Slf4jTest.log(msg);
            Thread.sleep(1000);
        }
        System.out.println("------------- end -------------");
    }
}
